/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package elevatronic.models;

import java.util.ArrayList;
import java.util.List;

/**
 * A floor contains two buttons to call an elevator to ascend and descend
 * peopleAtFloor are people who is waiting an elevator.
 * @author Exosta
 */
public class Floor {
    int number;
    Button buttonUp;
    Button buttonDown;
    List<People> peopleAtFloor;

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public Button getButtonUp() {
        return buttonUp;
    }

    public void setButtonUp(Button buttonUp) {
        this.buttonUp = buttonUp;
    }

    public Button getButtonDown() {
        return buttonDown;
    }

    public void setButtonDown(Button buttonDown) {
        this.buttonDown = buttonDown;
    }

    public List<People> getPeopleAtFloor() {
        return peopleAtFloor;
    }

    public void setPeopleAtFloor(List<People> peopleAtFloor) {
        this.peopleAtFloor = peopleAtFloor;
    }

    public Floor(int number) {
    	//initialize the people list
    	setPeopleAtFloor(new ArrayList<People>());
    	//initialize buttons
    	setButtonDown(new Button());
    	setButtonUp(new Button());
        this.number = number;
    }
    
    public void addPeople(People people) {
        this.peopleAtFloor.add(people);
    }
}
